package com.chinasoft.teacher;

import DengSiQi.DengSiQi;
import com.chinasoft.FSJ.fsj;
import com.chinasoft.LiangMeiChai.LiangMeiChai;
import com.chinasoft.daodao.daodao;
import com.chinasoft.dfs.dsf;
import com.chinasoft.huhao.HuHao;
import com.chinasoft.liang.zhihang;
import com.chinasoft.s36.s36;
import com.chinasoft.sunsenping.SunSenPing;
import com.chinasoft.yy.yy;
import com.chinasoft.zhangwei.ZhangWei;
import com.chinasoft.zhangwen.ZhangWen;
import com.chinasoft.mohaoyu.MoHaoYu;
import com.chinasoft.lqy.lqy;
import java.util.ArrayList;
import java.util.Random;
import java.util.Scanner;

public class TwMain {
    public static void main(String[] args) {
        // 创建一个 trueWord 对象列表
        ArrayList<TrueWord> twList = new ArrayList<>();

        // 添加所有同学
        twList.add(new TeacherWord());//不可能
        twList.add(new ZhangWen());
        twList.add(new ZhangWei());
        twList.add(new MoHaoYu());
        twList.add(new dsf());
        twList.add(new fsj());
        twList.add(new HuHao());
        twList.add(new zhihang());
        twList.add(new LiangMeiChai());
        twList.add(new s36());
        twList.add(new SunSenPing());
        twList.add(new DengSiQi());
        twList.add(new daodao());
        twList.add(new yy());
        twList.add(new lqy());

        // 随机对象
        Random random = new Random();

        // 得到一个键盘的输入对象
        Scanner scanner = new Scanner(System.in);

        while (true) {
            // 得到随机的index
            int index = random.nextInt(twList.size());
            // 取人
            TrueWord person = twList.get(index);

            System.out.println(person.getName() + "说：" + person.getWords());

            // 读取键盘的输入
            scanner.next();
        }


    }
}
